package com.yingxin.yxerp.module.sys.entity.enums;

/**
 * 字典类型
 */
public enum DictionaryType {

    JL_DW("JL_DW", "计量单位"),
    CZ_GL("CZ_GL", "材质管理"),
    DJ_GL("DJ_GL", "等级管理"),
    CD_GL("CD_GL", "产地管理"),
    YS_LX("YS_LX", "运输路线"),
    DRIVER("DRIVER","司机"),
    MY_CK("MY_CK","贸易仓库"),
    JG_CK("JG_CK","加工仓库"),
    CURRENCY("CURRENCY", "币种"),
    BARREL("BARREL","内筒"),
    ;

    private String type;

    private String typeName;

    DictionaryType(String type, String typeName) {
        this.type = type;
        this.typeName = typeName;
    }

    public String getType() {
        return type;
    }

    public void setType(String type) {
        this.type = type;
    }

    public String getTypeName() {
        return typeName;
    }

    public void setTypeName(String typeName) {
        this.typeName = typeName;
    }


    public static DictionaryType getEnum(String type) {
        for (DictionaryType i : DictionaryType.values()) {
            if (i.getType().equals(type)) {
                return i;
            }
        }
        return null;
    }
}
